﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhonTai.Industry.Contracts.Model.Entity;
using ZhonTai.Industry.Core.CraftGather.Query;

namespace ZhonTai.Industry.Core.Service.MessageHandler.CraftGather
{
    public class QueryMessageHandler : IMessageHandler
    {
        private readonly QueryHandle _queryHandle;

        public QueryMessageHandler(QueryHandle queryHandle)
        {
            _queryHandle = queryHandle;
        }

        public async Task HandleAsync(PushShip message)
        {
            await _queryHandle.ExecuteAsync(message);
        }
    }
}